local zhongyanshenli = fk.CreateSkill{
  name = "zhongyanshenli",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["zhongyanshenli"] = "终焉",
  [":zhongyanshenli"] = "锁定技，游戏开始时，令所有角色获得一点最大体力值并恢复一点体力。<br/>"..
    "第二轮开始时，你通灵成为月蚀神龙。",

}

zhongyanshenli:addEffect(fk.GameStart, {
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self.name) and #player.room:getOtherPlayers(player, false) > 0
  end,
  on_cost = Util.TrueFunc,
  on_use = function (self, event, target, player, data)
    local room = player.room
    local armor = math.floor(player.maxHp)
    for _, p in ipairs(room:getAlivePlayers()) do
        room:changeMaxHp(p, 1)
       room:recover({
      who = p,
      num = 1,
      recoverBy = p,
      skillName = self.name,
    })
    end
  end,
})


zhongyanshenli:addEffect(fk.RoundStart, {
  anim_type = "support",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self.name) and
      player:usedSkillTimes(self.name, Player.HistoryGame) == 0 and
      player.room:getBanner("RoundCount") == 2
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    if player.dead then
        room:revivePlayer(p, true)
    end
    if player.general == "long__luyinjiade" then
      room:setPlayerProperty(player, "general", "yveshishenlong")
    end
    if player.deputyGeneral == "long__luyinjiade" then
      room:setPlayerProperty(player, "deputyGeneral", "yveshishenlong")
    end
    room:handleAddLoseSkills(player, "miemokunling", nil, true, false)
  end,
})

return zhongyanshenli
